//
//  SimpleAudioPlayer.h
//  SimpleAudioTest
//
//  Created by Handymood on 11-5-27.
//  Copyright 2011 __Hanydmood__. All rights reserved.
//

#import <UIKit/UIKit.h>

#import <AVfoundation/AVfoundation.h>

#import "ImageUIButton.h"
#import "UIComponentBase.h"
@class ImageUIButton;
@class UIComponentBase;

@interface SimpleAudioPlayer : UIComponentBase <AVAudioPlayerDelegate>
{
    ImageUIButton *playButton;
    ImageUIButton *pauseButton;
    
    AVAudioPlayer *audioPlayer;
    
    NSString  *snd;
}

@property(nonatomic,copy) NSString *snd;

-(void)initAudioPlayer:(NSString *)audioPath
                    autoPlay:(BOOL) inAutoPlay 
                       isLoop:(BOOL) inLoop
                       isButtonShow:(BOOL) inButtonShow;

-(void)setXY:(CGFloat) inx 
        offy:(CGFloat) iny;

-(void) buttonSizeAdjust:(CGFloat) inwidth
                             height:(CGFloat) inheight;

-(void) mouseDownProcPlay:(id)sender;
-(void) mouseDownProcPause:(id)sender;

-(void) manuallyMusicOn;
-(void) manuallyMusicOff;

-(BOOL) musicOn;

-(void)reset;

@end
